function [model_new] = Maximization(nos, R, model, lambda)
k = model.k;
U = model.U;
V = model.V;
[p,m] = size(nos);

nk = sum(R,1);
w = nk/(p*m);

Sigma_new = zeros(1,1,k);
X = reshape(nos - U*V',1,p*m);
for i = 1:k
    temp = R(:,i)'.* X * X';
    Sigma_new(:,:,i) = temp/nk(i)+eps;
end

model.Sigma =Sigma_new;
R_new = Expectation(nos, model);

W = sqrt(sum(R_new./(2*pi*(repmat(Sigma_new(:)',p*m,1))),2));
W = reshape(W, p, m);
% [U_new, V_new, err] = mf_gd(nos, U, V, W, lambda);
[U_new, V_new] = mf_ne(nos, U, V, W);

model_new.k = k;
model_new.U = U_new;
model_new.V = V_new;
model_new.weight = w;
model_new.Sigma =Sigma_new;
